package domainModel;

import java.util.LinkedList;

/**
 * The Class Member.
 */
public class Member implements MemberInt{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/** The id. */
	private int id;
	
	/** The user name. */
	private String userName;
	
	/** The email. */
	private String email;
	
	/** The first name. */
	private String firstName;
	
	/** The last name. */
	private String lastName;
	
	private LinkedList<MemberInt> friends;
	

	

	
	/**
	 * Instantiates a new member. parameter constructor.
	 *
	 * @param id the id
	 * @param userName the user name
	 * @param password the password
	 * @param email the email
	 * @param fName the f name
	 * @param lName the l name
	 */
	public Member(int id, String userName, String email, String fName, String lName){
	
		this.setEmail(email);
		this.setFirstName(fName);
		this.setLastName(lName);
		this.setId(id);
		this.friends = new LinkedList<MemberInt>();
		this.setUserName(userName);
	}
	

	
	public void addFriend(MemberInt friend){
		this.friends.add(friend);
	}
	public void removeFriend(MemberInt friend){
		this.friends.remove(friend);
	}

	/* (non-Javadoc)
	 * @see domainModel.MemberInt#getEmail()
	 */
	@Override
	public String getEmail() {
		return this.email;
	}

	/* (non-Javadoc)
	 * @see domainModel.MemberInt#getFirstName()
	 */
	@Override
	public String getFirstName() {
		return this.firstName;
	}

	/* (non-Javadoc)
	 * @see domainModel.MemberInt#getId()
	 */
	@Override
	public int getId() {
		return this.id;
	}

	/* (non-Javadoc)
	 * @see domainModel.MemberInt#getLastName()
	 */
	@Override
	public String getLastName() {
		return this.lastName;
	}

	/* (non-Javadoc)
	 * @see domainModel.MemberInt#getUserName()
	 */
	@Override
	public String getUserName() {
		return this.userName;
	}





	/* (non-Javadoc)
	 * @see domainModel.MemberInt#setEmail(java.lang.String)
	 */
	@Override
	public void setEmail(String email) {
		this.email = email;
	}

	/* (non-Javadoc)
	 * @see domainModel.MemberInt#setFirstName(java.lang.String)
	 */
	@Override
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	/* (non-Javadoc)
	 * @see domainModel.MemberInt#setId(int)
	 */
	@Override
	public void setId(int id) {
		this.id = id;
	}

	/* (non-Javadoc)
	 * @see domainModel.MemberInt#setLastName(java.lang.String)
	 */
	@Override
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}


	/* (non-Javadoc)
	 * @see domainModel.MemberInt#setUserName(java.lang.String)
	 */
	@Override
	public void setUserName(String userName) {
		this.userName = userName;
	}



	@Override
	public LinkedList<MemberInt> getFriends() {
		return this.friends;
	}

}
